/**
 * Copyright (2017, ) Institute of Software, Chinese Academy of Sciences
 * Copyright (2017, ) Bocloud Co,. Lmt
 */
package cn.abcsys.devops.deployer.initialization;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.web.context.support.WebApplicationContextUtils;

import javax.annotation.Resource;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * Created by xyj on 2016/4/19.
 */

public class AllInit implements ServletContextListener {
    static Logger logger = Logger.getLogger(AllInit.class);
    private Log4JInit lji ;
    public static String scriptFolder;

    public Log4JInit getLji() {
        return lji;
    }

    public void contextInitialized(ServletContextEvent sce) {
        logger.info("Start devops-deployer initialization jobs:");
        lji = new Log4JInit();
        lji.setLog4JPath(sce);
        //logger.info("Finish log4J Path Setting.");
    }

    public void contextDestroyed(ServletContextEvent sce) {

    }
}
